package com.huawei.bean;

import java.util.Arrays;
import java.util.Date;
//model 或 bean 模型类 一般和数据库表一一关联
public class User {
    private int id;//id
    private String name;//姓名
    private int age;//年龄
    private char gender;//性别
    private Date birthday;//生日
    private  String[] hobbies;//兴趣爱好

    public User() {}

    public User( String name, int age, char gender, Date birthday, String[] hobbies) {
        this.id = id;
        this.name = name;
        this.age = age;
        this.gender = gender;
        this.birthday = birthday;
        this.hobbies = hobbies;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public char getGender() {
        return gender;
    }

    public void setGender(char gender) {
        this.gender = gender;
    }

    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    public String[] getHobbies() {
        return hobbies;
    }
    public String getHobbie() {
        String s = Arrays.toString(this.hobbies);
        return s;
    }

    public void setHobbies(String[] hobbies) {
        this.hobbies = hobbies;
    }

    @Override
    public String toString() {
        return "com.hw.User{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", age=" + age +
                ", ender=" + gender +
                ", birthday=" + birthday +
                ", hobbies=" + Arrays.toString(hobbies) +
                '}';
    }

}
